package com.csjung.games.gamenori.client.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

import com.csjung.games.gamenori.shared.UserProxy;

public class ChatRequestEvent extends GwtEvent<ChatRequestEvent.Handler> {

  private UserProxy userProxy;
  
  public ChatRequestEvent(UserProxy userProxy) {
    this.setUserProxy(userProxy);
  }
  /**
   * Handler for {@link ChatRequestEvent}.
   */
  public interface Handler extends EventHandler {
    
    void onChatStart(ChatRequestEvent event);
  }
  
  public static final Type<ChatRequestEvent.Handler> TYPE = new Type<ChatRequestEvent.Handler>();

  @Override
  public com.google.gwt.event.shared.GwtEvent.Type<Handler> getAssociatedType() {
    return TYPE;
  }

  @Override
  protected void dispatch(Handler handler) {
    handler.onChatStart(this);
  }

  public UserProxy getUserProxy() {
    return userProxy;
  }

  public void setUserProxy(UserProxy userProxy) {
    this.userProxy = userProxy;
  }
}
